<?php
include("xmlrpcutils/utils.php");


// XMLRPC Server config
$host = "127.0.0.1";
$uri = "/webpanel/src/server/bootstrap.php";
$port = 3000;

/*
* Main
*/
	echo ":".date("G:i:s");

	$result = xu_rpc_http_concise(
		array(
			'method' => "mail.listDomains",
			'args'  => array("OpenQuest", 0,-1),			
			'host'  => $host,
			'uri'  => $uri,
			'port'  => $port
			)
		);

	print "<br><b>: > listDomains result</b><br>";
	print_r($result);

	$result = xu_rpc_http_concise(
		array(
			'method' => "mail.listDomainUsers",
			'args'  => array("OpenQuest", "@novodominio2.pt",0,-1),			
			'host'  => $host,
			'uri'  => $uri,
			'port'  => $port
			)
		);

	print "<br><b>: > listDomainUsers result</b><br>";
	print_r($result);

	$result = xu_rpc_http_concise(
		array(
			'method' => "mail.newDomain",
			'args'  => array("OpenQuest", "novodominio2.pt"),			
			'host'  => $host,
			'uri'  => $uri,
			'port'  => $port
			)
		);

	print "<br><b>: > newDomain result</b><br>";
	print_r($result);

	$result = xu_rpc_http_concise(
		array(
			'method' => "mail.newUser",
			'args'  => array("OpenQuest", "novodominio2.pt", "catarina"),			
			'host'  => $host,
			'uri'  => $uri,
			'port'  => $port
			)
		);

	print "<br><b>: > newUser result</b><br>";
	print_r($result);

?>
